package net.sky.oa.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *维修项目表
 *FloMendoption.@author hond
 */
@Entity
@Table(name = "FLO_MENDOPTION")//维修项目表
public class FloMendoption implements Serializable {

	private static final long serialVersionUID = 5673991033245515351L;
	
	// Fields

	private Long id;
	private String name; //项目表
	private String desn; //描述
	private FloMendtype type;//维修类型id

	// Constructors

	/** default constructor */
	public FloMendoption() {
	}

	/** minimal constructor */
	public FloMendoption(Long id) {
		this.id = id;
	}
	
	@Id
	@SequenceGenerator(name="SQ_FLOMENDOPTION_ID",sequenceName="SQ_FLOMENDOPTION_ID",allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="SQ_FLOMENDOPTION_ID")
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "NAME", length = 20)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "DESN", length = 200)
	public String getDesn() {
		return this.desn;
	}

	public void setDesn(String desn) {
		this.desn = desn;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TYPE_ID")
	public FloMendtype getType() {
		return this.type;
	}

	public void setType(FloMendtype type) {
		this.type = type;
	}

}